"use strict";
const e = require("../../../common/vendor.js"),
  r = require("../../../api/request.js"),
  a = {
    __name: "search-author",
    props: {
      authorData: {
        type: Array,
        required: !0
      }
    },
    setup(a) {
      const t = a;
      return (n, o) => e.e({
        a: e.f(a.authorData, ((a, n, o) => ({
          a: a.avatarUrl,
          b: e.t(a.nickname),
          c: e.t(a.numberOfFans),
          d: e.t(a.concernedUser ? "已关注" : "+ 关注"),
          e: e.n(a.concernedUser ? "yiguanzhu" : "weiguanzhu"),
          f: e.o((e => async function (e, a, n) {
            e ? (await r.requestApi("/unfollow_author", {
              im_concerned_uid: a
            }), t.authorData[n].concernedUser = !1) : (await r.requestApi("/follow_author", {
              im_concerned_uid: a
            }), t.authorData[n].concernedUser = !0)
          }(a.concernedUser, a.uid, n)), n),
          g: n
        }))),
        b: a.authorData.length <= 0
      }, (a.authorData.length, {}))
    }
  },
  t = e._export_sfc(a, [
    ["__scopeId", "data-v-86e092e8"]
  ]);
wx.createComponent(t);